/*
 * Copyright 2008 Neil Bacon
 * Distributed under the terms of the Mozilla Public License version 1.1
 * or the GNU General Public License version 3.
 */

package nb.ref;

import java.lang.ref.ReferenceQueue;

/**
 * Produce HashableReference<V> instances.
 * User doesn't need to know whether they are based on Soft or Weak References.
 * @param <V>
 */
public interface HashableReferenceFactory<V> {

    HashableReference<V> get(V referent);

    HashableReference<V> get(V referent, ReferenceQueue<V> queue);
}
